Switch hotplug scripts to use /bin/bash rather than /bin/sh.
authorAlastair Tse <atse@xensource.com>
Thu, 4 Jan 2007 14:25:58 +0000 (14:25 +0000)
committerAlastair Tse <atse@xensource.com>
Thu, 4 Jan 2007 14:25:58 +0000 (14:25 +0000)
Hotplug scripts include certain bash-isms that are not supported under
some distros' default shell (eg. Ubuntu 6.10's use of dash)

Signed-off-by: Alastair Tse <atse@xensource.com>
16 files changed:
tools/examples/blktap
tools/examples/block
tools/examples/block-enbd
tools/examples/block-nbd
tools/examples/external-device-migrate
tools/examples/network-bridge
tools/examples/network-nat
tools/examples/network-route
tools/examples/vif-bridge
tools/examples/vif-common.sh
tools/examples/vif-nat
tools/examples/vif-route
tools/examples/vtpm
tools/examples/vtpm-delete
tools/examples/xen-backend.agent
tools/examples/xen-hotplug-cleanup

index bc25b48be26ac96055cfd80a142073ad72e8fa6f..5a7ee3236bb9cdc9a8dc342f1dc8aef3b8d5d469 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # Copyright (c) 2005, XenSource Ltd.
 
index 8ec73231bf1aea450e50b2fb7539e1777223bd3a..2b6b9911254a76864bc57ac1e861c9b77491d8c7 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 dir=$(dirname "$0")
 . "$dir/block-common.sh"
index 75c6f257aa640a6ae6b39ebbf759690143364912..67faa84268bf019202780ea54f0875cbe3857818 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # Usage: block-enbd [bind server ctl_port |unbind node]
 #
index 8c5cb17b7970e767ae77613033237f48e214fef2..b29b31564a6f976604ff19b071d5a37511c62fe4 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # Usage: block-nbd [bind server ctl_port |unbind node]
 #
index fa523342311fa211b5d0cbe5eec673bae2302154..c7c99afec33224cefe3511edc2f1fae1914d28bd 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # Copyright (c) 2005 IBM Corporation
 #
index 49b79db95b549864f7fcbcd52e5df3a850d25b02..b616a72275ab571b601cc556c43cf31a310c7ee3 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #============================================================================
 # Default Xen network start/stop script.
 # Xend calls a network script when it starts.
index 94b84307c0b7023b0cb1a7952aad223806f5281f..62d2b0c259722771b927475a700af0b398652eb2 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #============================================================================
 # Default Xen network start/stop script when using NAT.
 # Xend calls a network script when it starts.
index de535c32803d3075cf08d5247ff5c183653290ee..574441e33484581e821678b5c11bc021ddee8fab 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #============================================================================
 # Default Xen network start/stop script.
 # Xend calls a network script when it starts.
index 7008210579da1113ce314b4db17d91dee9af85ed..0935ad2fae9a22275512ad4e329b7b6096dcd47b 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #============================================================================
 # /etc/xen/vif-bridge
 #
index 50da9a4494a2db2f5623a746775e32758e4339f4..ee67ee2aaa85d1c684ac5bef71f6c195e2a05e02 100644 (file)
@@ -64,7 +64,7 @@ then
 fi
 
 
-function frob_iptable()
+frob_iptable()
 {
   if [ "$command" == "online" ]
   then
@@ -89,7 +89,7 @@ If you are using iptables, this may affect networking for guest domains."
 # to those coming from the specified networks, though we allow DHCP requests
 # as well.
 #
-function handle_iptable()
+handle_iptable()
 {
   # Check for a working iptables installation.  Checking for the iptables
   # binary is not sufficient, because the user may not have the appropriate
@@ -123,7 +123,7 @@ function handle_iptable()
 # Print the IP address currently in use at the given interface, or nothing if
 # the interface is not up.
 #
-function ip_of()
+ip_of()
 {
   ip addr show "$1" | awk "/^.*inet.*$1\$/{print \$2}" | sed -n '1 s,/.*,,p'
 }
@@ -137,7 +137,7 @@ function ip_of()
 # to these scripts, or eth0 by default.  This function will call fatal if no
 # such interface could be found.
 #
-function dom0_ip()
+dom0_ip()
 {
   local nd=${netdev:-eth0}
   local result=$(ip_of "$nd")
index 29611654eb8edeb0e989915bead99e4161cb7e79..579d7eba351c25d5041452f4ebb82d68a53a8460 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #============================================================================
 # /etc/xen/vif-nat
 #
index 8d0fb8d76cec38c14d9b0fa90d708f638aade256..f5fd88ed5a8e203576adbda562b6c67b8cdb8b1a 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #============================================================================
 # /etc/xen/vif-route
 #
index cf8b50ff50ff5a94d416e365f3848ab6d9172f63..38a4532fc2c8d715d21f5fbebabf10861ad776e9 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 dir=$(dirname "$0")
 . "$dir/vtpm-hotplug-common.sh"
index 14bfddcd9466c02d95c1b65a5cfbc092665b6298..b54a093f02aaa8ec6ed23a16dbbd9f2c4c62930c 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # This scripts must be called the following way:
 # vtpm-delete <domain name>
index 3a01a2c7ea5188b8ee8d520bb44743bc8338d6ce..f043854ad0b3e6d67155dc09d5ff0f337acf6d89 100755 (executable)
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/bash
 
 PATH=/etc/xen/scripts:$PATH
 
index 6356a9189239e6ae9b7a37f41c7de33cc8388fc2..f7337e45bfa0c52d6fcddd8eeead4dd222bcf9f1 100644 (file)
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/bash
 
 dir=$(dirname "$0")
 . "$dir/xen-hotplug-common.sh"